package com.itheima.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 点位实体类
 *
 * @Name Node
 * @Author 81475
 * @Date 2022-08-13 13:23
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_node")
public class Node {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 点位名称
     */
    private String name;
    /**
     * 点位详细地址
     */
    private String addr;
    /**
     * 所在区域Id
     */
    private String areaCode;

    @TableField(fill = FieldFill.INSERT)
    private Long createUserId;
    /**
     * 区域id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long regionId;
    /**
     * 商圈id
     */
    private Integer businessId;
    /**
     * 点位主Id
     */
    private Integer ownerId;
    /**
     * 点位主名称
     */
    private String ownerName;


    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
